package club;

import java.util.ArrayList;
import java.util.List;

public class club {
    String name;
    List<Department> departments;
    List<Activity> activities;

    public club(String name) {
        this.name = name;
        this.departments = new ArrayList<>();
        this.activities = new ArrayList<>();
    }

    public String getName() {
        return name;
    }

    public void addDepartment(Department department) {
        departments.add(department);
    }

    public void addActivity(Activity activity) {
        activities.add(activity);
    }

    public List<Department> getDepartments() {
        return departments;
    }

    public List<Activity> getActivities() {
        return activities;
    }


    public Department findDepartment(String departmentName) {
        for (Department department : departments) {
            if (department.getName().equals(departmentName)) {
                return department;
            }
        }
        return null;
    }
}
